@handsontable/vue 9.0.0 → 11.0.0
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/BaseEditorComponent.vue.d.ts +2 -2
- package/LICENSE.txt +19 -22
- package/commonjs/vue-handsontable.js +98 -71
- package/dist/vue-handsontable.js +121 -97
- package/dist/vue-handsontable.js.map +1 -1
- package/dist/vue-handsontable.min.js +22 -25
- package/dist/vue-handsontable.min.js.map +1 -1
- package/es/vue-handsontable.js +66 -40
- package/handsontable-non-commercial-license.pdf +0 -0
- package/helpers.d.ts +5 -1
- package/package.json +3 -3
- package/types.d.ts +4 -3
- package/handsontable-general-terms.pdf +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue-handsontable.min.js","sources":["../src/helpers.ts","../src/lib/lru/lru.js","../../../node_modules/vue-runtime-helpers/dist/normalize-component.mjs","../src/HotTable.vue","../../../node_modules/vue-class-component/dist/vue-class-component.esm.js","../src/BaseEditorComponent.vue"],"sourcesContent":["import Vue, { VNode } from 'vue';\nimport Handsontable from 'handsontable';\nimport { HotTableProps, VueProps, EditorComponent } from './types';\n\nconst unassignedPropSymbol = Symbol('unassigned');\nlet bulkComponentContainer = null;\n\n/**\n * Rewrite the settings object passed to the watchers to be a clean array/object prepared to use within Handsontable config.\n *\n * @param {*} observerSettings Watcher object containing the changed data.\n * @returns {Object|Array}\n */\nexport function rewriteSettings(observerSettings): any[] | object {\n const settingsType = Object.prototype.toString.call(observerSettings);\n let settings: any[] | object | null = null;\n let type: { array?: boolean, object?: boolean } = {};\n\n if (settingsType === '[object Array]') {\n settings = [];\n type.array = true;\n\n } else if (settingsType === '[object Object]') {\n settings = {};\n type.object = true;\n }\n\n if (type.array || type.object) {\n for (const p in observerSettings) {\n if (observerSettings.hasOwnProperty(p)) {\n settings[p] = observerSettings[p];\n }\n }\n\n } else {\n settings = observerSettings;\n }\n\n return settings;\n}\n\n/**\n * Private method to ensure the table is not calling `updateSettings` after editing cells.\n * @private\n */\nexport function preventInternalEditWatch(component) {\n component.hotInstance.addHook('beforeChange', () => {\n component.__internalEdit = true;\n });\n\n component.hotInstance.addHook('beforeCreateRow', () => {\n component.__internalEdit = true;\n });\n\n component.hotInstance.addHook('beforeCreateCol', () => {\n component.__internalEdit = true;\n });\n\n component.hotInstance.addHook('beforeRemoveRow', () => {\n component.__internalEdit = true;\n });\n\n component.hotInstance.addHook('beforeRemoveCol', () => {\n component.__internalEdit = true;\n });\n}\n\n/**\n * Generate an object containing all the available Handsontable properties and plugin hooks.\n *\n * @param {String} source Source for the factory (either 'HotTable' or 'HotColumn').\n * @returns {Object}\n */\nexport function propFactory(source): VueProps<HotTableProps> {\n const registeredHooks: string[] = Handsontable.hooks.getRegistered();\n\n let propSchema: VueProps<HotTableProps> = {};\n Object.assign(propSchema, Handsontable.DefaultSettings);\n\n for (let prop in propSchema) {\n propSchema[prop] = {\n default: unassignedPropSymbol\n };\n }\n\n for (let i = 0; i < registeredHooks.length; i++) {\n propSchema[registeredHooks[i]] = {\n default: unassignedPropSymbol\n };\n }\n\n propSchema.settings = {\n default: unassignedPropSymbol\n };\n\n if (source === 'HotTable') {\n propSchema.id = {\n type: String,\n default: 'hot-' + Math.random().toString(36).substring(5)\n };\n\n propSchema.wrapperRendererCacheSize = {\n type: Number,\n default: 3000\n };\n }\n\n return propSchema;\n}\n\n/**\n * Filter out all of the unassigned props, and return only the one passed to the component.\n *\n * @param {Object} props Object containing all the possible props.\n * @returns {Object} Object containing only used props.\n */\nexport function filterPassedProps(props) {\n const filteredProps: VueProps<HotTableProps> = {};\n const columnSettingsProp = props['settings'];\n\n if (columnSettingsProp !== unassignedPropSymbol) {\n for (let propName in columnSettingsProp) {\n if (columnSettingsProp.hasOwnProperty(propName) && columnSettingsProp[propName] !== unassignedPropSymbol) {\n filteredProps[propName] = columnSettingsProp[propName];\n }\n }\n }\n\n for (let propName in props) {\n if (props.hasOwnProperty(propName) && propName !== 'settings' && props[propName] !== unassignedPropSymbol) {\n filteredProps[propName] = props[propName];\n }\n }\n\n return filteredProps;\n}\n\n/**\n * Prepare the settings object to be used as the settings for Handsontable, based on the props provided to the component.\n *\n * @param {HotTableProps} props The props passed to the component.\n * @param {Handsontable.GridSettings} currentSettings The current Handsontable settings.\n * @returns {Handsontable.GridSettings} An object containing the properties, ready to be used within Handsontable.\n */\nexport function prepareSettings(props: HotTableProps, currentSettings?: Handsontable.GridSettings): Handsontable.GridSettings {\n const assignedProps: VueProps<HotTableProps> = filterPassedProps(props);\n const hotSettingsInProps: {} = props.settings ? props.settings : assignedProps;\n const additionalHotSettingsInProps: Handsontable.GridSettings = props.settings ? assignedProps : null;\n const newSettings = {};\n\n for (const key in hotSettingsInProps) {\n if (\n hotSettingsInProps.hasOwnProperty(key) &&\n hotSettingsInProps[key] !== void 0 &&\n ((currentSettings && key !== 'data') ? !simpleEqual(currentSettings[key], hotSettingsInProps[key]) : true)\n ) {\n newSettings[key] = hotSettingsInProps[key];\n }\n }\n\n for (const key in additionalHotSettingsInProps) {\n if (\n additionalHotSettingsInProps.hasOwnProperty(key) &&\n key !== 'id' &&\n key !== 'settings' &&\n key !== 'wrapperRendererCacheSize' &&\n additionalHotSettingsInProps[key] !== void 0 &&\n ((currentSettings && key !== 'data') ? !simpleEqual(currentSettings[key], additionalHotSettingsInProps[key]) : true)\n ) {\n newSettings[key] = additionalHotSettingsInProps[key];\n }\n }\n\n return newSettings;\n}\n\n/**\n * Get the VNode element with the provided type attribute from the component slots.\n *\n * @param {Array} componentSlots Array of slots from a component.\n * @param {String} type Type of the child component. Either `hot-renderer` or `hot-editor`.\n * @returns {Object|null} The VNode of the child component (or `null` when nothing's found).\n */\nexport function findVNodeByType(componentSlots: VNode[], type: string): VNode {\n let componentVNode: VNode = null;\n\n componentSlots.every((slot, index) => {\n if (slot.data && slot.data.attrs && slot.data.attrs[type] !== void 0) {\n componentVNode = slot;\n return false;\n }\n\n return true;\n });\n\n return componentVNode;\n}\n\n/**\n * Get all `hot-column` component instances from the provided children array.\n *\n * @param {Array} children Array of children from a component.\n * @returns {Array} Array of `hot-column` instances.\n */\nexport function getHotColumnComponents(children) {\n return children.filter((child) => child.$options.name === 'HotColumn');\n}\n\n/**\n * Create an instance of the Vue Component based on the provided VNode.\n *\n * @param {Object} vNode VNode element to be turned into a component instance.\n * @param {Object} parent Instance of the component to be marked as a parent of the newly created instance.\n * @param {Object} props Props to be passed to the new instance.\n * @param {Object} data Data to be passed to the new instance.\n */\nexport function createVueComponent(vNode: VNode, parent: Vue, props: object, data: object): EditorComponent {\n const ownerDocument = parent.$el ? parent.$el.ownerDocument : document;\n const settings: object = {\n propsData: props,\n parent,\n data\n };\n\n if (!bulkComponentContainer) {\n bulkComponentContainer = ownerDocument.createElement('DIV');\n bulkComponentContainer.id = 'vueHotComponents';\n\n ownerDocument.body.appendChild(bulkComponentContainer);\n }\n\n const componentContainer = ownerDocument.createElement('DIV');\n bulkComponentContainer.appendChild(componentContainer);\n\n return (new (vNode.componentOptions as any).Ctor(settings)).$mount(componentContainer);\n}\n\n/**\n * Compare two objects using `JSON.stringify`.\n * *Note: * As it's using the stringify function to compare objects, the property order in both objects is\n * important. It will return `false` for the same objects, if they're defined in a different order.\n *\n * @param {object} objectA First object to compare.\n * @param {object} objectB Second object to compare.\n * @returns {boolean} `true` if they're the same, `false` otherwise.\n */\nfunction simpleEqual(objectA, objectB) {\n return JSON.stringify(objectA) === JSON.stringify(objectB);\n}\n","/**\n * A doubly linked list-based Least Recently Used (LRU) cache. Will keep most\n * recently used items while discarding least recently used items when its limit\n * is reached.\n *\n * Licensed under MIT. Copyright (c) 2010 Rasmus Andersson <http://hunch.se/>\n * See README.md for details.\n *\n * Illustration of the design:\n *\n * entry entry entry entry\n * ______ ______ ______ ______\n * | head |.newer => | |.newer => | |.newer => | tail |\n * | A | | B | | C | | D |\n * |______| <= older.|______| <= older.|______| <= older.|______|\n *\n * removed <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- added\n */\n(function(g,f){\n const e = typeof exports == 'object' ? exports : typeof g == 'object' ? g : {};\n f(e);\n if (typeof define == 'function' && define.amd) { define('lru', e); }\n})(this, function(exports) {\n\n const NEWER = Symbol('newer');\n const OLDER = Symbol('older');\n\n function LRUMap(limit, entries) {\n if (typeof limit !== 'number') {\n // called as (entries)\n entries = limit;\n limit = 0;\n }\n\n this.size = 0;\n this.limit = limit;\n this.oldest = this.newest = undefined;\n this._keymap = new Map();\n\n if (entries) {\n this.assign(entries);\n if (limit < 1) {\n this.limit = this.size;\n }\n }\n }\n\n exports.LRUMap = LRUMap;\n\n function Entry(key, value) {\n this.key = key;\n this.value = value;\n this[NEWER] = undefined;\n this[OLDER] = undefined;\n }\n\n\n LRUMap.prototype._markEntryAsUsed = function(entry) {\n if (entry === this.newest) {\n // Already the most recenlty used entry, so no need to update the list\n return;\n }\n // HEAD--------------TAIL\n // <.older .newer>\n // <--- add direction --\n // A B C <D> E\n if (entry[NEWER]) {\n if (entry === this.oldest) {\n this.oldest = entry[NEWER];\n }\n entry[NEWER][OLDER] = entry[OLDER]; // C <-- E.\n }\n if (entry[OLDER]) {\n entry[OLDER][NEWER] = entry[NEWER]; // C. --> E\n }\n entry[NEWER] = undefined; // D --x\n entry[OLDER] = this.newest; // D. --> E\n if (this.newest) {\n this.newest[NEWER] = entry; // E. <-- D\n }\n this.newest = entry;\n };\n\n LRUMap.prototype.assign = function(entries) {\n let entry, limit = this.limit || Number.MAX_VALUE;\n this._keymap.clear();\n let it = entries[Symbol.iterator]();\n for (let itv = it.next(); !itv.done; itv = it.next()) {\n let e = new Entry(itv.value[0], itv.value[1]);\n this._keymap.set(e.key, e);\n if (!entry) {\n this.oldest = e;\n } else {\n entry[NEWER] = e;\n e[OLDER] = entry;\n }\n entry = e;\n if (limit-- == 0) {\n throw new Error('overflow');\n }\n }\n this.newest = entry;\n this.size = this._keymap.size;\n };\n\n LRUMap.prototype.get = function(key) {\n // First, find our cache entry\n var entry = this._keymap.get(key);\n if (!entry) return; // Not cached. Sorry.\n // As <key> was found in the cache, register it as being requested recently\n this._markEntryAsUsed(entry);\n return entry.value;\n };\n\n LRUMap.prototype.set = function(key, value) {\n var entry = this._keymap.get(key);\n\n if (entry) {\n // update existing\n entry.value = value;\n this._markEntryAsUsed(entry);\n return this;\n }\n\n // new entry\n this._keymap.set(key, (entry = new Entry(key, value)));\n\n if (this.newest) {\n // link previous tail to the new tail (entry)\n this.newest[NEWER] = entry;\n entry[OLDER] = this.newest;\n } else {\n // we're first in -- yay\n this.oldest = entry;\n }\n\n // add new entry to the end of the linked list -- it's now the freshest entry.\n this.newest = entry;\n ++this.size;\n if (this.size > this.limit) {\n // we hit the limit -- remove the head\n this.shift();\n }\n\n return this;\n };\n\n LRUMap.prototype.shift = function() {\n // todo: handle special case when limit == 1\n var entry = this.oldest;\n if (entry) {\n if (this.oldest[NEWER]) {\n // advance the list\n this.oldest = this.oldest[NEWER];\n this.oldest[OLDER] = undefined;\n } else {\n // the cache is exhausted\n this.oldest = undefined;\n this.newest = undefined;\n }\n // Remove last strong reference to <entry> and remove links from the purged\n // entry being returned:\n entry[NEWER] = entry[OLDER] = undefined;\n this._keymap.delete(entry.key);\n --this.size;\n return [entry.key, entry.value];\n }\n };\n\n// ----------------------------------------------------------------------------\n// Following code is optional and can be removed without breaking the core\n// functionality.\n LRUMap.prototype.has = function(key) {\n return this._keymap.has(key);\n };\n});\n","function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\r\n if (typeof shadowMode !== 'boolean') {\r\n createInjectorSSR = createInjector;\r\n createInjector = shadowMode;\r\n shadowMode = false;\r\n }\r\n // Vue.extend constructor export interop.\r\n const options = typeof script === 'function' ? script.options : script;\r\n // render functions\r\n if (template && template.render) {\r\n options.render = template.render;\r\n options.staticRenderFns = template.staticRenderFns;\r\n options._compiled = true;\r\n // functional template\r\n if (isFunctionalTemplate) {\r\n options.functional = true;\r\n }\r\n }\r\n // scopedId\r\n if (scopeId) {\r\n options._scopeId = scopeId;\r\n }\r\n let hook;\r\n if (moduleIdentifier) {\r\n // server build\r\n hook = function (context) {\r\n // 2.3 injection\r\n context =\r\n context || // cached call\r\n (this.$vnode && this.$vnode.ssrContext) || // stateful\r\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional\r\n // 2.2 with runInNewContext: true\r\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\r\n context = __VUE_SSR_CONTEXT__;\r\n }\r\n // inject component styles\r\n if (style) {\r\n style.call(this, createInjectorSSR(context));\r\n }\r\n // register component module identifier for async chunk inference\r\n if (context && context._registeredComponents) {\r\n context._registeredComponents.add(moduleIdentifier);\r\n }\r\n };\r\n // used by ssr in case component is cached and beforeCreate\r\n // never gets called\r\n options._ssrRegister = hook;\r\n }\r\n else if (style) {\r\n hook = shadowMode\r\n ? function (context) {\r\n style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\r\n }\r\n : function (context) {\r\n style.call(this, createInjector(context));\r\n };\r\n }\r\n if (hook) {\r\n if (options.functional) {\r\n // register for functional component in vue file\r\n const originalRender = options.render;\r\n options.render = function renderWithStyleInjection(h, context) {\r\n hook.call(context);\r\n return originalRender(h, context);\r\n };\r\n }\r\n else {\r\n // inject component registration as beforeCreate hook\r\n const existing = options.beforeCreate;\r\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\r\n }\r\n }\r\n return script;\r\n}\n\nexport default normalizeComponent;\n//# sourceMappingURL=normalize-component.mjs.map\n","<template>\n <div :id=\"id\">\n <slot></slot>\n </div>\n</template>\n\n<script lang=\"ts\">\n import {\n propFactory,\n preventInternalEditWatch,\n prepareSettings,\n createVueComponent,\n findVNodeByType,\n getHotColumnComponents\n } from './helpers';\n import Vue, { VNode } from 'vue';\n import {\n HotTableData,\n HotTableMethods,\n HotTableProps,\n HotTableComponent,\n EditorComponent\n } from './types';\n import * as packageJson from '../package.json';\n import { LRUMap } from './lib/lru/lru';\n import Handsontable from 'handsontable';\n\n const HotTable: HotTableComponent<Vue, HotTableData, HotTableMethods, {}, HotTableProps> = {\n name: 'HotTable',\n props: propFactory('HotTable'),\n watch: {\n mergedHotSettings: function (value) {\n if (value.data) {\n if (\n this.hotInstance.isColumnModificationAllowed() ||\n (\n !this.hotInstance.isColumnModificationAllowed() &&\n this.hotInstance.countSourceCols() === this.miscCache.currentSourceColumns\n )\n ) {\n // If the dataset dimensions change, update the index mappers.\n this.matchHotMappersSize(value.data);\n\n // Data is automatically synchronized by reference.\n delete value.data;\n }\n }\n\n // If there are another options changed, update the HOT settings, render the table otherwise.\n if (Object.keys(value).length) {\n this.hotInstance.updateSettings(value);\n\n } else {\n this.hotInstance.render();\n }\n\n this.miscCache.currentSourceColumns = this.hotInstance.countSourceCols();\n }\n },\n data: function () {\n const rendererCache = new LRUMap(this.wrapperRendererCacheSize);\n\n // Make the LRU cache destroy each removed component\n rendererCache.shift = function () {\n let entry = LRUMap.prototype.shift.call(this);\n entry[1].component.$destroy();\n\n return entry;\n };\n\n return {\n __internalEdit: false,\n miscCache: {\n // TODO: A workaround for #7548; data.length !== rowIndexMapper.getNumberOfIndexes() for NestedRows plugin.\n dataLength: 0,\n currentSourceColumns: null\n },\n hotInstance: null,\n columnSettings: null,\n rendererCache: rendererCache,\n editorCache: new Map()\n };\n },\n computed: {\n mergedHotSettings: function (): Handsontable.GridSettings {\n return prepareSettings(this.$props, this.hotInstance ? this.hotInstance.getSettings() : void 0);\n }\n },\n methods: {\n /**\n * Initialize Handsontable.\n */\n hotInit: function (): void {\n const globalRendererVNode = this.getGlobalRendererVNode();\n const globalEditorVNode = this.getGlobalEditorVNode();\n\n const newSettings: Handsontable.GridSettings = prepareSettings(this.$props);\n\n newSettings.columns = this.columnSettings ? this.columnSettings : newSettings.columns;\n\n if (globalEditorVNode) {\n newSettings.editor = this.getEditorClass(globalEditorVNode, this);\n\n globalEditorVNode.child.$destroy();\n }\n\n if (globalRendererVNode) {\n newSettings.renderer = this.getRendererWrapper(globalRendererVNode, this);\n\n globalRendererVNode.child.$destroy();\n }\n\n this.hotInstance = new Handsontable.Core(this.$el, newSettings);\n this.hotInstance.init();\n\n preventInternalEditWatch(this);\n\n this.miscCache.dataLength = newSettings?.data?.length ?? 0;\n this.miscCache.currentSourceColumns = this.hotInstance.countSourceCols();\n },\n matchHotMappersSize: function (data: any[][]): void {\n const rowsToRemove: number[] = [];\n const columnsToRemove: number[] = [];\n const oldDataLength = this.miscCache.dataLength;\n const isColumnModificationAllowed = this.hotInstance.isColumnModificationAllowed();\n let indexMapperColumnCount = 0;\n\n if (data && data.length !== oldDataLength) {\n if (data.length < oldDataLength) {\n for (let r = data.length; r < oldDataLength; r++) {\n rowsToRemove.push(r);\n }\n }\n }\n\n if (isColumnModificationAllowed) {\n indexMapperColumnCount = this.hotInstance.columnIndexMapper.getNumberOfIndexes();\n\n if (data && data[0] && data[0]?.length !==\n indexMapperColumnCount) {\n if (data[0].length < indexMapperColumnCount) {\n for (let c = data[0].length; c < indexMapperColumnCount; c++) {\n columnsToRemove.push(c);\n }\n }\n }\n }\n\n this.hotInstance.batch(() => {\n if (rowsToRemove.length > 0) {\n this.miscCache.dataLength -= rowsToRemove.length;\n this.hotInstance.rowIndexMapper.removeIndexes(rowsToRemove);\n\n } else {\n this.miscCache.dataLength += data.length - oldDataLength;\n this.hotInstance.rowIndexMapper.insertIndexes(oldDataLength - 1, data.length - oldDataLength);\n }\n\n if (isColumnModificationAllowed && data.length !== 0) {\n if (columnsToRemove.length > 0) {\n this.hotInstance.columnIndexMapper.removeIndexes(columnsToRemove);\n\n } else {\n this.hotInstance.columnIndexMapper.insertIndexes(indexMapperColumnCount - 1, data[0].length - indexMapperColumnCount);\n }\n }\n });\n },\n getGlobalRendererVNode: function (): VNode | null {\n const hotTableSlots: VNode[] = this.$slots.default || [];\n return findVNodeByType(hotTableSlots, 'hot-renderer');\n },\n getGlobalEditorVNode: function (): VNode | null {\n const hotTableSlots: VNode[] = this.$slots.default || [];\n return findVNodeByType(hotTableSlots, 'hot-editor');\n },\n /**\n * Get settings for the columns provided in the `hot-column` components.\n */\n getColumnSettings: function (): HotTableProps[] | void {\n const hotColumns = getHotColumnComponents(this.$children);\n let usesRendererComponent = false;\n let columnSettings: HotTableProps[] = hotColumns.map((elem) => {\n if (elem.usesRendererComponent) {\n usesRendererComponent = true;\n }\n\n return {...elem.columnSettings};\n });\n\n if (usesRendererComponent &&\n (this.settings && (this.settings.autoColumnSize !== false || this.settings.autoRowSize)) &&\n (this.autoColumnSize !== false || this.autoRowSize)) {\n console.warn('Your `hot-table` configuration includes both `hot-column` and `autoRowSize`/`autoColumnSize`, which are not compatible with each other ' +\n 'in this version of `@handsontable/vue`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.')\n }\n\n return columnSettings.length ? columnSettings : void 0;\n },\n /**\n * Create the wrapper function for the provided renderer child component.\n *\n * @param {Object} vNode VNode of the renderer child component.\n * @param {Boolean} containerComponent Instance of the component, which will be treated as a parent for the newly created renderer component.\n * @returns {Function} The wrapper function used as the renderer.\n */\n getRendererWrapper: function (vNode: VNode, containerComponent: Vue): (...args) => HTMLElement {\n const $vm = this;\n\n return function (instance, TD, row, col, prop, value, cellProperties) {\n // Prevent caching and rendering of the GhostTable table cells\n if (TD && !TD.getAttribute('ghost-table')) {\n const rendererCache = $vm.rendererCache;\n const rendererArgs: object = {\n hotInstance: instance,\n TD,\n row,\n col,\n prop,\n value,\n cellProperties,\n isRenderer: true\n };\n\n if (rendererCache && !rendererCache.has(`${row}-${col}`)) {\n const mountedComponent: Vue = createVueComponent(vNode, containerComponent, vNode.componentOptions.propsData, rendererArgs);\n\n rendererCache.set(`${row}-${col}`, {\n component: mountedComponent,\n lastUsedTD: null\n });\n }\n\n const cachedEntry = rendererCache.get(`${row}-${col}`);\n const cachedComponent: Vue = cachedEntry.component;\n const cachedTD: HTMLTableCellElement = cachedEntry.lastUsedTD;\n\n Object.assign(cachedComponent.$data, rendererArgs);\n\n if (!cachedComponent.$el.parentElement || cachedTD !== TD) {\n // Clear the previous contents of a TD\n while (TD.firstChild) {\n TD.removeChild(TD.firstChild);\n }\n\n TD.appendChild(cachedComponent.$el);\n\n cachedEntry.lastUsedTD = TD;\n }\n }\n\n return TD;\n };\n },\n /**\n * Create a fresh class to be used as an editor, based on the editor component provided.\n *\n * @param {Object} vNode VNode for the editor child component.\n * @param {Boolean} containerComponent Instance of the component, which will be treated as a parent for the newly created editor component.\n * @returns {Class} The class used as an editor in Handsontable.\n */\n getEditorClass: function (vNode: VNode, containerComponent: Vue): typeof Handsontable.editors.BaseEditor {\n const componentKey: string = vNode.key ? vNode.key.toString() : null;\n const componentName: string = (vNode.componentOptions.Ctor as any).options.name;\n const componentCacheKey = componentKey ? `${componentName}:${componentKey}` : componentName;\n\n const editorCache = this.editorCache;\n let mountedComponent: EditorComponent = null;\n\n if (!editorCache.has(componentCacheKey)) {\n mountedComponent = createVueComponent(vNode, containerComponent, vNode.componentOptions.propsData, {isEditor: true});\n\n editorCache.set(componentCacheKey, mountedComponent);\n\n } else {\n mountedComponent = editorCache.get(componentCacheKey);\n }\n\n return mountedComponent.$data.hotCustomEditorClass;\n },\n },\n mounted: function () {\n this.columnSettings = this.getColumnSettings();\n\n return this.hotInit();\n },\n beforeDestroy: function () {\n this.hotInstance.destroy();\n },\n version: (packageJson as any).version\n };\n\n export default HotTable;\n export { HotTable };\n</script>\n","/**\n * vue-class-component v7.2.6\n * (c) 2015-present Evan You\n * @license MIT\n */\nimport Vue from 'vue';\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\n// The rational behind the verbose Reflect-feature check below is the fact that there are polyfills\n// which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys.\n// Without this check consumers will encounter hard to track down runtime errors.\nfunction reflectionIsSupported() {\n return typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;\n}\nfunction copyReflectionMetadata(to, from) {\n forwardMetadata(to, from);\n Object.getOwnPropertyNames(from.prototype).forEach(function (key) {\n forwardMetadata(to.prototype, from.prototype, key);\n });\n Object.getOwnPropertyNames(from).forEach(function (key) {\n forwardMetadata(to, from, key);\n });\n}\n\nfunction forwardMetadata(to, from, propertyKey) {\n var metaKeys = propertyKey ? Reflect.getOwnMetadataKeys(from, propertyKey) : Reflect.getOwnMetadataKeys(from);\n metaKeys.forEach(function (metaKey) {\n var metadata = propertyKey ? Reflect.getOwnMetadata(metaKey, from, propertyKey) : Reflect.getOwnMetadata(metaKey, from);\n\n if (propertyKey) {\n Reflect.defineMetadata(metaKey, metadata, to, propertyKey);\n } else {\n Reflect.defineMetadata(metaKey, metadata, to);\n }\n });\n}\n\nvar fakeArray = {\n __proto__: []\n};\nvar hasProto = fakeArray instanceof Array;\nfunction createDecorator(factory) {\n return function (target, key, index) {\n var Ctor = typeof target === 'function' ? target : target.constructor;\n\n if (!Ctor.__decorators__) {\n Ctor.__decorators__ = [];\n }\n\n if (typeof index !== 'number') {\n index = undefined;\n }\n\n Ctor.__decorators__.push(function (options) {\n return factory(options, key, index);\n });\n };\n}\nfunction mixins() {\n for (var _len = arguments.length, Ctors = new Array(_len), _key = 0; _key < _len; _key++) {\n Ctors[_key] = arguments[_key];\n }\n\n return Vue.extend({\n mixins: Ctors\n });\n}\nfunction isPrimitive(value) {\n var type = _typeof(value);\n\n return value == null || type !== 'object' && type !== 'function';\n}\nfunction warn(message) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-class-component] ' + message);\n }\n}\n\nfunction collectDataFromConstructor(vm, Component) {\n // override _init to prevent to init as Vue instance\n var originalInit = Component.prototype._init;\n\n Component.prototype._init = function () {\n var _this = this;\n\n // proxy to actual vm\n var keys = Object.getOwnPropertyNames(vm); // 2.2.0 compat (props are no longer exposed as self properties)\n\n if (vm.$options.props) {\n for (var key in vm.$options.props) {\n if (!vm.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n }\n\n keys.forEach(function (key) {\n Object.defineProperty(_this, key, {\n get: function get() {\n return vm[key];\n },\n set: function set(value) {\n vm[key] = value;\n },\n configurable: true\n });\n });\n }; // should be acquired class property values\n\n\n var data = new Component(); // restore original _init to avoid memory leak (#209)\n\n Component.prototype._init = originalInit; // create plain data object\n\n var plainData = {};\n Object.keys(data).forEach(function (key) {\n if (data[key] !== undefined) {\n plainData[key] = data[key];\n }\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(Component.prototype instanceof Vue) && Object.keys(plainData).length > 0) {\n warn('Component class must inherit Vue or its descendant class ' + 'when class property is used.');\n }\n }\n\n return plainData;\n}\n\nvar $internalHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeDestroy', 'destroyed', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch' // 2.6\n];\nfunction componentFactory(Component) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n options.name = options.name || Component._componentTag || Component.name; // prototype props.\n\n var proto = Component.prototype;\n Object.getOwnPropertyNames(proto).forEach(function (key) {\n if (key === 'constructor') {\n return;\n } // hooks\n\n\n if ($internalHooks.indexOf(key) > -1) {\n options[key] = proto[key];\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(proto, key);\n\n if (descriptor.value !== void 0) {\n // methods\n if (typeof descriptor.value === 'function') {\n (options.methods || (options.methods = {}))[key] = descriptor.value;\n } else {\n // typescript decorated data\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return _defineProperty({}, key, descriptor.value);\n }\n });\n }\n } else if (descriptor.get || descriptor.set) {\n // computed properties\n (options.computed || (options.computed = {}))[key] = {\n get: descriptor.get,\n set: descriptor.set\n };\n }\n });\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return collectDataFromConstructor(this, Component);\n }\n }); // decorate options\n\n var decorators = Component.__decorators__;\n\n if (decorators) {\n decorators.forEach(function (fn) {\n return fn(options);\n });\n delete Component.__decorators__;\n } // find super\n\n\n var superProto = Object.getPrototypeOf(Component.prototype);\n var Super = superProto instanceof Vue ? superProto.constructor : Vue;\n var Extended = Super.extend(options);\n forwardStaticMembers(Extended, Component, Super);\n\n if (reflectionIsSupported()) {\n copyReflectionMetadata(Extended, Component);\n }\n\n return Extended;\n}\nvar reservedPropertyNames = [// Unique id\n'cid', // Super Vue constructor\n'super', // Component options that will be used by the component\n'options', 'superOptions', 'extendOptions', 'sealedOptions', // Private assets\n'component', 'directive', 'filter'];\nvar shouldIgnore = {\n prototype: true,\n arguments: true,\n callee: true,\n caller: true\n};\n\nfunction forwardStaticMembers(Extended, Original, Super) {\n // We have to use getOwnPropertyNames since Babel registers methods as non-enumerable\n Object.getOwnPropertyNames(Original).forEach(function (key) {\n // Skip the properties that should not be overwritten\n if (shouldIgnore[key]) {\n return;\n } // Some browsers does not allow reconfigure built-in properties\n\n\n var extendedDescriptor = Object.getOwnPropertyDescriptor(Extended, key);\n\n if (extendedDescriptor && !extendedDescriptor.configurable) {\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(Original, key); // If the user agent does not support `__proto__` or its family (IE <= 10),\n // the sub class properties may be inherited properties from the super class in TypeScript.\n // We need to exclude such properties to prevent to overwrite\n // the component options object which stored on the extended constructor (See #192).\n // If the value is a referenced value (object or function),\n // we can check equality of them and exclude it if they have the same reference.\n // If it is a primitive value, it will be forwarded for safety.\n\n if (!hasProto) {\n // Only `cid` is explicitly exluded from property forwarding\n // because we cannot detect whether it is a inherited property or not\n // on the no `__proto__` environment even though the property is reserved.\n if (key === 'cid') {\n return;\n }\n\n var superDescriptor = Object.getOwnPropertyDescriptor(Super, key);\n\n if (!isPrimitive(descriptor.value) && superDescriptor && superDescriptor.value === descriptor.value) {\n return;\n }\n } // Warn if the users manually declare reserved properties\n\n\n if (process.env.NODE_ENV !== 'production' && reservedPropertyNames.indexOf(key) >= 0) {\n warn(\"Static property name '\".concat(key, \"' declared on class '\").concat(Original.name, \"' \") + 'conflicts with reserved property name of Vue internal. ' + 'It may cause unexpected behavior of the component. Consider renaming the property.');\n }\n\n Object.defineProperty(Extended, key, descriptor);\n });\n}\n\nfunction Component(options) {\n if (typeof options === 'function') {\n return componentFactory(options);\n }\n\n return function (Component) {\n return componentFactory(Component, options);\n };\n}\n\nComponent.registerHooks = function registerHooks(keys) {\n $internalHooks.push.apply($internalHooks, _toConsumableArray(keys));\n};\n\nexport default Component;\nexport { createDecorator, mixins };\n","<script lang=\"ts\">\n import Vue from 'vue';\n import Handsontable from 'handsontable';\n import Component from 'vue-class-component';\n\n @Component({})\n class BaseEditorComponent extends Vue implements Handsontable._editors.Base {\n name = 'BaseEditorComponent';\n instance = null;\n row = null;\n col = null;\n prop = null;\n TD = null;\n originalValue = null;\n cellProperties = null;\n state = null;\n hot = null;\n\n mounted() {\n const _this = this;\n\n this.$data.hotCustomEditorClass = function () {\n const customEditorClass = class CustomEditor extends Handsontable.editors.BaseEditor implements Handsontable._editors.Base {\n constructor(hotInstance, row, col, prop, TD, cellProperties) {\n super(hotInstance, row, col, prop, TD, cellProperties);\n\n _this.$data.hotCustomEditorInstance = this;\n }\n\n focus() {\n }\n\n getValue() {\n }\n\n setValue() {\n }\n\n open() {\n }\n\n close() {\n }\n } as any;\n\n // Fill with the rest of the BaseEditorComponent methods\n Object.getOwnPropertyNames(Handsontable.editors.BaseEditor.prototype).forEach(propName => {\n if (propName === 'constructor') {\n return;\n }\n\n customEditorClass.prototype[propName] = function (...args) {\n return _this[propName].call(this, ...args);\n }\n });\n\n return customEditorClass;\n }();\n }\n\n // BaseEditorComponent methods:\n private _fireCallbacks(...args) {\n (Handsontable.editors.BaseEditor.prototype as any)._fireCallbacks.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n beginEditing(...args) {\n return Handsontable.editors.BaseEditor.prototype.beginEditing.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n cancelChanges(...args) {\n return Handsontable.editors.BaseEditor.prototype.cancelChanges.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n checkEditorSection(...args) {\n return Handsontable.editors.BaseEditor.prototype.checkEditorSection.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n close(...args) {\n return Handsontable.editors.BaseEditor.prototype.close.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n discardEditor(...args) {\n return Handsontable.editors.BaseEditor.prototype.discardEditor.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n enableFullEditMode(...args) {\n return Handsontable.editors.BaseEditor.prototype.enableFullEditMode.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n extend(...args) {\n return Handsontable.editors.BaseEditor.prototype.extend.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n finishEditing(...args) {\n return Handsontable.editors.BaseEditor.prototype.finishEditing.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n focus(...args) {\n return Handsontable.editors.BaseEditor.prototype.focus.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n getValue(...args) {\n return Handsontable.editors.BaseEditor.prototype.getValue.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n init(...args) {\n return Handsontable.editors.BaseEditor.prototype.init.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n isInFullEditMode(...args) {\n return Handsontable.editors.BaseEditor.prototype.isInFullEditMode.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n isOpened(...args) {\n return Handsontable.editors.BaseEditor.prototype.isOpened.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n isWaiting(...args) {\n return Handsontable.editors.BaseEditor.prototype.isWaiting.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n open(...args) {\n return Handsontable.editors.BaseEditor.prototype.open.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n prepare(row, col, prop, TD, originalValue, cellProperties) {\n this.$data.hotInstance = cellProperties.instance;\n this.$data.row = row;\n this.$data.col = col;\n this.$data.prop = prop;\n this.$data.TD = TD;\n this.$data.originalValue = originalValue;\n this.$data.cellProperties = cellProperties;\n\n return Handsontable.editors.BaseEditor.prototype.prepare.call(this.$data.hotCustomEditorInstance, row, col, prop, TD, originalValue, cellProperties);\n }\n\n saveValue(...args) {\n return Handsontable.editors.BaseEditor.prototype.saveValue.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n setValue(...args) {\n return Handsontable.editors.BaseEditor.prototype.setValue.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n addHook(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).addHook.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n removeHooksByKey(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).removeHooksByKey.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n clearHooks(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).clearHooks.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n getEditedCell(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).getEditedCell.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n getEditedCellsZIndex(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).getEditedCellsZIndex.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n getEditedCellsLayerClass(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).getEditedCellsLayerClass.call(this.$data.hotCustomEditorInstance, ...args);\n }\n }\n\n export default BaseEditorComponent;\n export { BaseEditorComponent };\n</script>\n"],"names":["unassignedPropSymbol","Symbol","bulkComponentContainer","propFactory","source","registeredHooks","Handsontable","hooks","getRegistered","propSchema","prop","Object","assign","DefaultSettings","i","length","settings","id","type","String","Math","random","toString","substring","wrapperRendererCacheSize","Number","filterPassedProps","props","filteredProps","columnSettingsProp","propName","hasOwnProperty","prepareSettings","currentSettings","assignedProps","hotSettingsInProps","additionalHotSettingsInProps","newSettings","key","simpleEqual","findVNodeByType","componentSlots","componentVNode","every","slot","index","data","attrs","createVueComponent","vNode","parent","ownerDocument","$el","document","propsData","createElement","body","appendChild","componentContainer","componentOptions","Ctor","$mount","objectA","objectB","JSON","stringify","exports","NEWER","OLDER","LRUMap","limit","entries","size","oldest","this","newest","undefined","_keymap","Map","Entry","value","prototype","_markEntryAsUsed","entry","MAX_VALUE","clear","it","iterator","itv","next","done","e","set","Error","get","shift","has","f","normalizeComponent","template","style","script","scopeId","isFunctionalTemplate","moduleIdentifier","shadowMode","createInjector","createInjectorSSR","createInjectorShadow","options","hook","render","staticRenderFns","_compiled","functional","_scopeId","context","$vnode","ssrContext","__VUE_SSR_CONTEXT__","call","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","originalRender","h","existing","beforeCreate","concat","component","hotInstance","addHook","__internalEdit","filter","child","name","_typeof","obj","_typeof2","constructor","_defineProperty","defineProperty","enumerable","configurable","writable","_toConsumableArray","arr","Array","isArray","arr2","_arrayWithoutHoles","iter","from","_iterableToArray","TypeError","_nonIterableSpread","reflectionIsSupported","Reflect","defineMetadata","getOwnMetadataKeys","copyReflectionMetadata","to","forwardMetadata","getOwnPropertyNames","forEach","propertyKey","metaKey","metadata","getOwnMetadata","hasProto","__proto__","collectDataFromConstructor","vm","Component","originalInit","_init","_this","keys","push","plainData","$internalHooks","componentFactory","arguments","_componentTag","proto","indexOf","descriptor","getOwnPropertyDescriptor","methods","mixins","computed","decorators","__decorators__","fn","superProto","getPrototypeOf","Super","Vue","Extended","extend","forwardStaticMembers","shouldIgnore","callee","caller","Original","extendedDescriptor","superDescriptor","registerHooks","apply"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;itFAIA,IAAMA,EAAuBC,OAAO,cAChCC,EAAyB,cAoEbC,EAAYC,OACpBC,EAA4BC,UAAaC,MAAMC,gBAEjDC,EAAsC,OAGrC,IAAIC,KAFTC,OAAOC,OAAOH,EAAYH,UAAaO,iBAEtBJ,EACfA,EAAWC,GAAQ,SACRV,OAIR,IAAIc,EAAI,EAAOT,EAAgBU,OAApBD,EAA4BA,IAC1CL,EAAWJ,EAAgBS,IAAM,SACtBd,UAIbS,EAAWO,SAAW,SACXhB,GAGI,aAAXI,IACFK,EAAWQ,GAAK,CACdC,KAAMC,eACG,OAASC,KAAKC,SAASC,SAAS,IAAIC,UAAU,IAGzDd,EAAWe,yBAA2B,CACpCN,KAAMO,eACG,MAINhB,WASOiB,EAAkBC,OAC1BC,EAAyC,GACzCC,EAAqBF,EAAK,YAE5BE,IAAuB7B,MACpB,IAAI8B,KAAYD,EACfA,EAAmBE,eAAeD,IAAaD,EAAmBC,KAAc9B,IAClF4B,EAAcE,GAAYD,EAAmBC,QAK9C,IAAIA,KAAYH,EACfA,EAAMI,eAAeD,IAA0B,aAAbA,GAA2BH,EAAMG,KAAc9B,IACnF4B,EAAcE,GAAYH,EAAMG,WAI7BF,WAUOI,EAAgBL,EAAsBM,OAC9CC,EAAyCR,EAAkBC,GAC3DQ,EAAyBR,EAAMX,SAAWW,EAAMX,SAAWkB,EAC3DE,EAA0DT,EAAMX,SAAWkB,EAAgB,KAC3FG,EAAc,OAEf,IAAMC,KAAOH,GAEdA,EAAmBJ,eAAeO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AAQ,SAAU6B,UACpBA,EAAGvF,aAELmE,EAAUmB,oBAIfE,EAAa1L,OAAO2L,eAAetB,EAAU/F,WAC7CsH,EAAQF,aAAsBG,UAAMH,EAAWvD,YAAc0D,UAC7DC,EAAWF,EAAMG,OAAO7F,UAC5B8F,EAAqBF,EAAUzB,EAAWuB,GAEtCxC,KACFI,EAAuBsC,EAAUzB,GAG5ByB,EAOT,IAAIG,EAAe,CACjB3H,WAAW,EACXwG,WAAW,EACXoB,QAAQ,EACRC,QAAQ,GAGV,SAASH,EAAqBF,EAAUM,EAAUR,GAEhD5L,OAAO2J,oBAAoByC,GAAUxC,SAAQ,SAAUjI,OAEjDsK,EAAatK,QAKb0K,EAAqBrM,OAAOmL,yBAAyBW,EAAUnK,OAE/D0K,GAAuBA,EAAmB9D,kBAzJ7BlE,EACf9D,EA4JE2K,EAAalL,OAAOmL,yBAAyBiB,EAAUzK,OAQtDsI,EAAU,IAID,QAARtI,aAIA2K,EAAkBtM,OAAOmL,yBAAyBS,EAAOjK,MA5K7DpB,EAAOyH,EADQ3D,EA+KE6G,EAAW7G,OA5KhB,MAATA,IAA0B,WAAT9D,GAA8B,aAATA,IA4KH+L,GAAmBA,EAAgBjI,QAAU6G,EAAW7G,aAUhGrE,OAAOqI,eAAeyD,EAAUnK,EAAKuJ,QAIzC,SAASb,EAAUnE,SACM,mBAAZA,EACF2E,EAAiB3E,GAGnB,SAAUmE,UACRQ,EAAiBR,EAAWnE,IAIvCmE,EAAUkC,cAAgB,SAAuB9B,GAC/CG,EAAeF,KAAK8B,MAAM5B,EAAgBnC,EAAmBgC,KCrT/D;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"vue-handsontable.min.js","sources":["../src/helpers.ts","../src/lib/lru/lru.js","../../../node_modules/vue-runtime-helpers/dist/normalize-component.mjs","../src/HotTable.vue","../../../node_modules/vue-class-component/dist/vue-class-component.esm.js","../src/BaseEditorComponent.vue"],"sourcesContent":["import Vue, { VNode } from 'vue';\nimport Handsontable from 'handsontable/base';\nimport { HotTableProps, VueProps, EditorComponent } from './types';\n\nconst unassignedPropSymbol = Symbol('unassigned');\nlet bulkComponentContainer = null;\n\n/**\n * Message for the warning thrown if the Handsontable instance has been destroyed.\n */\nexport const HOT_DESTROYED_WARNING = 'The Handsontable instance bound to this component was destroyed and cannot be' +\n ' used properly.';\n\n/**\n * Rewrite the settings object passed to the watchers to be a clean array/object prepared to use within Handsontable config.\n *\n * @param {*} observerSettings Watcher object containing the changed data.\n * @returns {Object|Array}\n */\nexport function rewriteSettings(observerSettings): any[] | object {\n const settingsType = Object.prototype.toString.call(observerSettings);\n let settings: any[] | object | null = null;\n let type: { array?: boolean, object?: boolean } = {};\n\n if (settingsType === '[object Array]') {\n settings = [];\n type.array = true;\n\n } else if (settingsType === '[object Object]') {\n settings = {};\n type.object = true;\n }\n\n if (type.array || type.object) {\n for (const p in observerSettings) {\n if (observerSettings.hasOwnProperty(p)) {\n settings[p] = observerSettings[p];\n }\n }\n\n } else {\n settings = observerSettings;\n }\n\n return settings;\n}\n\n/**\n * Private method to ensure the table is not calling `updateSettings` after editing cells.\n * @private\n */\nexport function preventInternalEditWatch(component) {\n if (component.hotInstance) {\n component.hotInstance.addHook('beforeChange', () => {\n component.__internalEdit = true;\n });\n\n component.hotInstance.addHook('beforeCreateRow', () => {\n component.__internalEdit = true;\n });\n\n component.hotInstance.addHook('beforeCreateCol', () => {\n component.__internalEdit = true;\n });\n\n component.hotInstance.addHook('beforeRemoveRow', () => {\n component.__internalEdit = true;\n });\n\n component.hotInstance.addHook('beforeRemoveCol', () => {\n component.__internalEdit = true;\n });\n }\n}\n\n/**\n * Generate an object containing all the available Handsontable properties and plugin hooks.\n *\n * @param {String} source Source for the factory (either 'HotTable' or 'HotColumn').\n * @returns {Object}\n */\nexport function propFactory(source): VueProps<HotTableProps> {\n const registeredHooks: string[] = Handsontable.hooks.getRegistered();\n\n let propSchema: VueProps<HotTableProps> = {};\n Object.assign(propSchema, Handsontable.DefaultSettings);\n\n for (let prop in propSchema) {\n propSchema[prop] = {\n default: unassignedPropSymbol\n };\n }\n\n for (let i = 0; i < registeredHooks.length; i++) {\n propSchema[registeredHooks[i]] = {\n default: unassignedPropSymbol\n };\n }\n\n propSchema.settings = {\n default: unassignedPropSymbol\n };\n\n if (source === 'HotTable') {\n propSchema.id = {\n type: String,\n default: 'hot-' + Math.random().toString(36).substring(5)\n };\n\n propSchema.wrapperRendererCacheSize = {\n type: Number,\n default: 3000\n };\n }\n\n return propSchema;\n}\n\n/**\n * Filter out all of the unassigned props, and return only the one passed to the component.\n *\n * @param {Object} props Object containing all the possible props.\n * @returns {Object} Object containing only used props.\n */\nexport function filterPassedProps(props) {\n const filteredProps: VueProps<HotTableProps> = {};\n const columnSettingsProp = props['settings'];\n\n if (columnSettingsProp !== unassignedPropSymbol) {\n for (let propName in columnSettingsProp) {\n if (columnSettingsProp.hasOwnProperty(propName) && columnSettingsProp[propName] !== unassignedPropSymbol) {\n filteredProps[propName] = columnSettingsProp[propName];\n }\n }\n }\n\n for (let propName in props) {\n if (props.hasOwnProperty(propName) && propName !== 'settings' && props[propName] !== unassignedPropSymbol) {\n filteredProps[propName] = props[propName];\n }\n }\n\n return filteredProps;\n}\n\n/**\n * Prepare the settings object to be used as the settings for Handsontable, based on the props provided to the component.\n *\n * @param {HotTableProps} props The props passed to the component.\n * @param {Handsontable.GridSettings} currentSettings The current Handsontable settings.\n * @returns {Handsontable.GridSettings} An object containing the properties, ready to be used within Handsontable.\n */\nexport function prepareSettings(props: HotTableProps, currentSettings?: Handsontable.GridSettings): Handsontable.GridSettings {\n const assignedProps: VueProps<HotTableProps> = filterPassedProps(props);\n const hotSettingsInProps: {} = props.settings ? props.settings : assignedProps;\n const additionalHotSettingsInProps: Handsontable.GridSettings = props.settings ? assignedProps : null;\n const newSettings = {};\n\n for (const key in hotSettingsInProps) {\n if (\n hotSettingsInProps.hasOwnProperty(key) &&\n hotSettingsInProps[key] !== void 0 &&\n ((currentSettings && key !== 'data') ? !simpleEqual(currentSettings[key], hotSettingsInProps[key]) : true)\n ) {\n newSettings[key] = hotSettingsInProps[key];\n }\n }\n\n for (const key in additionalHotSettingsInProps) {\n if (\n additionalHotSettingsInProps.hasOwnProperty(key) &&\n key !== 'id' &&\n key !== 'settings' &&\n key !== 'wrapperRendererCacheSize' &&\n additionalHotSettingsInProps[key] !== void 0 &&\n ((currentSettings && key !== 'data') ? !simpleEqual(currentSettings[key], additionalHotSettingsInProps[key]) : true)\n ) {\n newSettings[key] = additionalHotSettingsInProps[key];\n }\n }\n\n return newSettings;\n}\n\n/**\n * Get the VNode element with the provided type attribute from the component slots.\n *\n * @param {Array} componentSlots Array of slots from a component.\n * @param {String} type Type of the child component. Either `hot-renderer` or `hot-editor`.\n * @returns {Object|null} The VNode of the child component (or `null` when nothing's found).\n */\nexport function findVNodeByType(componentSlots: VNode[], type: string): VNode {\n let componentVNode: VNode = null;\n\n componentSlots.every((slot, index) => {\n if (slot.data && slot.data.attrs && slot.data.attrs[type] !== void 0) {\n componentVNode = slot;\n return false;\n }\n\n return true;\n });\n\n return componentVNode;\n}\n\n/**\n * Get all `hot-column` component instances from the provided children array.\n *\n * @param {Array} children Array of children from a component.\n * @returns {Array} Array of `hot-column` instances.\n */\nexport function getHotColumnComponents(children) {\n return children.filter((child) => child.$options.name === 'HotColumn');\n}\n\n/**\n * Create an instance of the Vue Component based on the provided VNode.\n *\n * @param {Object} vNode VNode element to be turned into a component instance.\n * @param {Object} parent Instance of the component to be marked as a parent of the newly created instance.\n * @param {Object} props Props to be passed to the new instance.\n * @param {Object} data Data to be passed to the new instance.\n */\nexport function createVueComponent(vNode: VNode, parent: Vue, props: object, data: object): EditorComponent {\n const ownerDocument = parent.$el ? parent.$el.ownerDocument : document;\n const settings: object = {\n propsData: props,\n parent,\n data\n };\n\n if (!bulkComponentContainer) {\n bulkComponentContainer = ownerDocument.createElement('DIV');\n bulkComponentContainer.id = 'vueHotComponents';\n\n ownerDocument.body.appendChild(bulkComponentContainer);\n }\n\n const componentContainer = ownerDocument.createElement('DIV');\n bulkComponentContainer.appendChild(componentContainer);\n\n return (new (vNode.componentOptions as any).Ctor(settings)).$mount(componentContainer);\n}\n\n/**\n * Compare two objects using `JSON.stringify`.\n * *Note: * As it's using the stringify function to compare objects, the property order in both objects is\n * important. It will return `false` for the same objects, if they're defined in a different order.\n *\n * @param {object} objectA First object to compare.\n * @param {object} objectB Second object to compare.\n * @returns {boolean} `true` if they're the same, `false` otherwise.\n */\nfunction simpleEqual(objectA, objectB) {\n return JSON.stringify(objectA) === JSON.stringify(objectB);\n}\n","/**\n * A doubly linked list-based Least Recently Used (LRU) cache. Will keep most\n * recently used items while discarding least recently used items when its limit\n * is reached.\n *\n * Licensed under MIT. Copyright (c) 2010 Rasmus Andersson <http://hunch.se/>\n * See README.md for details.\n *\n * Illustration of the design:\n *\n * entry entry entry entry\n * ______ ______ ______ ______\n * | head |.newer => | |.newer => | |.newer => | tail |\n * | A | | B | | C | | D |\n * |______| <= older.|______| <= older.|______| <= older.|______|\n *\n * removed <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- added\n */\n(function(g,f){\n const e = typeof exports == 'object' ? exports : typeof g == 'object' ? g : {};\n f(e);\n if (typeof define == 'function' && define.amd) { define('lru', e); }\n})(this, function(exports) {\n\n const NEWER = Symbol('newer');\n const OLDER = Symbol('older');\n\n function LRUMap(limit, entries) {\n if (typeof limit !== 'number') {\n // called as (entries)\n entries = limit;\n limit = 0;\n }\n\n this.size = 0;\n this.limit = limit;\n this.oldest = this.newest = undefined;\n this._keymap = new Map();\n\n if (entries) {\n this.assign(entries);\n if (limit < 1) {\n this.limit = this.size;\n }\n }\n }\n\n exports.LRUMap = LRUMap;\n\n function Entry(key, value) {\n this.key = key;\n this.value = value;\n this[NEWER] = undefined;\n this[OLDER] = undefined;\n }\n\n\n LRUMap.prototype._markEntryAsUsed = function(entry) {\n if (entry === this.newest) {\n // Already the most recenlty used entry, so no need to update the list\n return;\n }\n // HEAD--------------TAIL\n // <.older .newer>\n // <--- add direction --\n // A B C <D> E\n if (entry[NEWER]) {\n if (entry === this.oldest) {\n this.oldest = entry[NEWER];\n }\n entry[NEWER][OLDER] = entry[OLDER]; // C <-- E.\n }\n if (entry[OLDER]) {\n entry[OLDER][NEWER] = entry[NEWER]; // C. --> E\n }\n entry[NEWER] = undefined; // D --x\n entry[OLDER] = this.newest; // D. --> E\n if (this.newest) {\n this.newest[NEWER] = entry; // E. <-- D\n }\n this.newest = entry;\n };\n\n LRUMap.prototype.assign = function(entries) {\n let entry, limit = this.limit || Number.MAX_VALUE;\n this._keymap.clear();\n let it = entries[Symbol.iterator]();\n for (let itv = it.next(); !itv.done; itv = it.next()) {\n let e = new Entry(itv.value[0], itv.value[1]);\n this._keymap.set(e.key, e);\n if (!entry) {\n this.oldest = e;\n } else {\n entry[NEWER] = e;\n e[OLDER] = entry;\n }\n entry = e;\n if (limit-- == 0) {\n throw new Error('overflow');\n }\n }\n this.newest = entry;\n this.size = this._keymap.size;\n };\n\n LRUMap.prototype.get = function(key) {\n // First, find our cache entry\n var entry = this._keymap.get(key);\n if (!entry) return; // Not cached. Sorry.\n // As <key> was found in the cache, register it as being requested recently\n this._markEntryAsUsed(entry);\n return entry.value;\n };\n\n LRUMap.prototype.set = function(key, value) {\n var entry = this._keymap.get(key);\n\n if (entry) {\n // update existing\n entry.value = value;\n this._markEntryAsUsed(entry);\n return this;\n }\n\n // new entry\n this._keymap.set(key, (entry = new Entry(key, value)));\n\n if (this.newest) {\n // link previous tail to the new tail (entry)\n this.newest[NEWER] = entry;\n entry[OLDER] = this.newest;\n } else {\n // we're first in -- yay\n this.oldest = entry;\n }\n\n // add new entry to the end of the linked list -- it's now the freshest entry.\n this.newest = entry;\n ++this.size;\n if (this.size > this.limit) {\n // we hit the limit -- remove the head\n this.shift();\n }\n\n return this;\n };\n\n LRUMap.prototype.shift = function() {\n // todo: handle special case when limit == 1\n var entry = this.oldest;\n if (entry) {\n if (this.oldest[NEWER]) {\n // advance the list\n this.oldest = this.oldest[NEWER];\n this.oldest[OLDER] = undefined;\n } else {\n // the cache is exhausted\n this.oldest = undefined;\n this.newest = undefined;\n }\n // Remove last strong reference to <entry> and remove links from the purged\n // entry being returned:\n entry[NEWER] = entry[OLDER] = undefined;\n this._keymap.delete(entry.key);\n --this.size;\n return [entry.key, entry.value];\n }\n };\n\n// ----------------------------------------------------------------------------\n// Following code is optional and can be removed without breaking the core\n// functionality.\n LRUMap.prototype.has = function(key) {\n return this._keymap.has(key);\n };\n});\n","function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\r\n if (typeof shadowMode !== 'boolean') {\r\n createInjectorSSR = createInjector;\r\n createInjector = shadowMode;\r\n shadowMode = false;\r\n }\r\n // Vue.extend constructor export interop.\r\n const options = typeof script === 'function' ? script.options : script;\r\n // render functions\r\n if (template && template.render) {\r\n options.render = template.render;\r\n options.staticRenderFns = template.staticRenderFns;\r\n options._compiled = true;\r\n // functional template\r\n if (isFunctionalTemplate) {\r\n options.functional = true;\r\n }\r\n }\r\n // scopedId\r\n if (scopeId) {\r\n options._scopeId = scopeId;\r\n }\r\n let hook;\r\n if (moduleIdentifier) {\r\n // server build\r\n hook = function (context) {\r\n // 2.3 injection\r\n context =\r\n context || // cached call\r\n (this.$vnode && this.$vnode.ssrContext) || // stateful\r\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional\r\n // 2.2 with runInNewContext: true\r\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\r\n context = __VUE_SSR_CONTEXT__;\r\n }\r\n // inject component styles\r\n if (style) {\r\n style.call(this, createInjectorSSR(context));\r\n }\r\n // register component module identifier for async chunk inference\r\n if (context && context._registeredComponents) {\r\n context._registeredComponents.add(moduleIdentifier);\r\n }\r\n };\r\n // used by ssr in case component is cached and beforeCreate\r\n // never gets called\r\n options._ssrRegister = hook;\r\n }\r\n else if (style) {\r\n hook = shadowMode\r\n ? function (context) {\r\n style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\r\n }\r\n : function (context) {\r\n style.call(this, createInjector(context));\r\n };\r\n }\r\n if (hook) {\r\n if (options.functional) {\r\n // register for functional component in vue file\r\n const originalRender = options.render;\r\n options.render = function renderWithStyleInjection(h, context) {\r\n hook.call(context);\r\n return originalRender(h, context);\r\n };\r\n }\r\n else {\r\n // inject component registration as beforeCreate hook\r\n const existing = options.beforeCreate;\r\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\r\n }\r\n }\r\n return script;\r\n}\n\nexport default normalizeComponent;\n//# sourceMappingURL=normalize-component.mjs.map\n","<template>\n <div :id=\"id\">\n <slot></slot>\n </div>\n</template>\n\n<script lang=\"ts\">\n import {\n propFactory,\n preventInternalEditWatch,\n prepareSettings,\n createVueComponent,\n findVNodeByType,\n getHotColumnComponents,\n HOT_DESTROYED_WARNING\n } from './helpers';\n import Vue, { VNode } from 'vue';\n import {\n HotTableData,\n HotTableMethods,\n HotTableProps,\n HotTableComponent,\n EditorComponent\n } from './types';\n import * as packageJson from '../package.json';\n import { LRUMap } from './lib/lru/lru';\n import Handsontable from 'handsontable/base';\n\n const HotTable: HotTableComponent<Vue, HotTableData, HotTableMethods, {}, HotTableProps> = {\n name: 'HotTable',\n props: propFactory('HotTable'),\n watch: {\n mergedHotSettings: function (value) {\n if (!this.hotInstance || value === void 0) {\n return;\n }\n\n if (value.data) {\n if (\n this.hotInstance.isColumnModificationAllowed() ||\n (\n !this.hotInstance.isColumnModificationAllowed() &&\n this.hotInstance.countSourceCols() === this.miscCache.currentSourceColumns\n )\n ) {\n // If the dataset dimensions change, update the index mappers.\n this.matchHotMappersSize();\n\n // Data is automatically synchronized by reference.\n delete value.data;\n }\n }\n\n // If there are another options changed, update the HOT settings, render the table otherwise.\n if (Object.keys(value).length) {\n this.hotInstance.updateSettings(value);\n\n } else {\n this.hotInstance.render();\n }\n\n this.miscCache.currentSourceColumns = this.hotInstance.countSourceCols();\n }\n },\n data: function () {\n const thisComponent: any = this;\n const rendererCache = new LRUMap(this.wrapperRendererCacheSize);\n\n // Make the LRU cache destroy each removed component\n rendererCache.shift = function () {\n let entry = LRUMap.prototype.shift.call(this);\n entry[1].component.$destroy();\n\n return entry;\n };\n\n return {\n __internalEdit: false,\n miscCache: {\n currentSourceColumns: null\n },\n __hotInstance: null,\n columnSettings: null,\n rendererCache: rendererCache,\n editorCache: new Map(),\n get hotInstance() {\n if (!thisComponent.__hotInstance || (thisComponent.__hotInstance && !thisComponent.__hotInstance.isDestroyed)) {\n\n // Will return the Handsontable instance or `null` if it's not yet been created.\n return thisComponent.__hotInstance;\n\n } else {\n console.warn(HOT_DESTROYED_WARNING);\n\n return null;\n }\n },\n set hotInstance(hotInstance) {\n thisComponent.__hotInstance = hotInstance;\n }\n };\n },\n computed: {\n mergedHotSettings: function (): Handsontable.GridSettings {\n return prepareSettings(this.$props, this.hotInstance ? this.hotInstance.getSettings() : void 0);\n }\n },\n methods: {\n /**\n * Initialize Handsontable.\n */\n hotInit: function (): void {\n const globalRendererVNode = this.getGlobalRendererVNode();\n const globalEditorVNode = this.getGlobalEditorVNode();\n\n const newSettings: Handsontable.GridSettings = prepareSettings(this.$props);\n\n newSettings.columns = this.columnSettings ? this.columnSettings : newSettings.columns;\n\n if (globalEditorVNode) {\n newSettings.editor = this.getEditorClass(globalEditorVNode, this);\n\n globalEditorVNode.child.$destroy();\n }\n\n if (globalRendererVNode) {\n newSettings.renderer = this.getRendererWrapper(globalRendererVNode, this);\n\n globalRendererVNode.child.$destroy();\n }\n\n this.hotInstance = new Handsontable.Core(this.$el, newSettings);\n this.hotInstance.init();\n\n preventInternalEditWatch(this);\n\n this.miscCache.currentSourceColumns = this.hotInstance.countSourceCols();\n },\n matchHotMappersSize: function(): void {\n if (!this.hotInstance) {\n return;\n }\n\n const data: Handsontable.CellValue[][] = this.hotInstance.getSourceData();\n const rowsToRemove: number[] = [];\n const columnsToRemove: number[] = [];\n const indexMapperRowCount = this.hotInstance.rowIndexMapper.getNumberOfIndexes();\n const isColumnModificationAllowed = this.hotInstance.isColumnModificationAllowed();\n let indexMapperColumnCount = 0;\n\n if (data && data.length !== indexMapperRowCount) {\n if (data.length < indexMapperRowCount) {\n for (let r = data.length; r < indexMapperRowCount; r++) {\n rowsToRemove.push(r);\n }\n }\n }\n\n if (isColumnModificationAllowed) {\n indexMapperColumnCount = this.hotInstance.columnIndexMapper.getNumberOfIndexes();\n\n if (data && data[0] && data[0]?.length !==\n indexMapperColumnCount) {\n if (data[0].length < indexMapperColumnCount) {\n for (let c = data[0].length; c < indexMapperColumnCount; c++) {\n columnsToRemove.push(c);\n }\n }\n }\n }\n\n this.hotInstance.batch(() => {\n if (rowsToRemove.length > 0) {\n this.hotInstance.rowIndexMapper.removeIndexes(rowsToRemove);\n\n } else {\n this.hotInstance.rowIndexMapper.insertIndexes(indexMapperRowCount - 1, data.length - indexMapperRowCount);\n }\n\n if (isColumnModificationAllowed && data.length !== 0) {\n if (columnsToRemove.length > 0) {\n this.hotInstance.columnIndexMapper.removeIndexes(columnsToRemove);\n\n } else {\n this.hotInstance.columnIndexMapper.insertIndexes(indexMapperColumnCount - 1, data[0].length - indexMapperColumnCount);\n }\n }\n });\n },\n getGlobalRendererVNode: function (): VNode | null {\n const hotTableSlots: VNode[] = this.$slots.default || [];\n return findVNodeByType(hotTableSlots, 'hot-renderer');\n },\n getGlobalEditorVNode: function (): VNode | null {\n const hotTableSlots: VNode[] = this.$slots.default || [];\n return findVNodeByType(hotTableSlots, 'hot-editor');\n },\n /**\n * Get settings for the columns provided in the `hot-column` components.\n */\n getColumnSettings: function (): HotTableProps[] | void {\n const hotColumns = getHotColumnComponents(this.$children);\n let usesRendererComponent = false;\n let columnSettings: HotTableProps[] = hotColumns.map((elem) => {\n if (elem.usesRendererComponent) {\n usesRendererComponent = true;\n }\n\n return {...elem.columnSettings};\n });\n\n if (usesRendererComponent &&\n (this.settings && (this.settings.autoColumnSize !== false || this.settings.autoRowSize)) &&\n (this.autoColumnSize !== false || this.autoRowSize)) {\n console.warn('Your `hot-table` configuration includes both `hot-column` and `autoRowSize`/`autoColumnSize`, which are not compatible with each other ' +\n 'in this version of `@handsontable/vue`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.')\n }\n\n return columnSettings.length ? columnSettings : void 0;\n },\n /**\n * Create the wrapper function for the provided renderer child component.\n *\n * @param {Object} vNode VNode of the renderer child component.\n * @param {Boolean} containerComponent Instance of the component, which will be treated as a parent for the newly created renderer component.\n * @returns {Function} The wrapper function used as the renderer.\n */\n getRendererWrapper: function (vNode: VNode, containerComponent: Vue): (...args) => HTMLElement {\n const $vm = this;\n\n return function (instance, TD, row, col, prop, value, cellProperties) {\n // Prevent caching and rendering of the GhostTable table cells\n if (TD && !TD.getAttribute('ghost-table')) {\n const rendererCache = $vm.rendererCache;\n const rendererArgs: object = {\n hotInstance: instance,\n TD,\n row,\n col,\n prop,\n value,\n cellProperties,\n isRenderer: true\n };\n\n if (rendererCache && !rendererCache.has(`${row}-${col}`)) {\n const mountedComponent: Vue = createVueComponent(vNode, containerComponent, vNode.componentOptions.propsData, rendererArgs);\n\n rendererCache.set(`${row}-${col}`, {\n component: mountedComponent,\n lastUsedTD: null\n });\n }\n\n const cachedEntry = rendererCache.get(`${row}-${col}`);\n const cachedComponent: Vue = cachedEntry.component;\n const cachedTD: HTMLTableCellElement = cachedEntry.lastUsedTD;\n\n Object.assign(cachedComponent.$data, rendererArgs);\n\n if (!cachedComponent.$el.parentElement || cachedTD !== TD) {\n // Clear the previous contents of a TD\n while (TD.firstChild) {\n TD.removeChild(TD.firstChild);\n }\n\n TD.appendChild(cachedComponent.$el);\n\n cachedEntry.lastUsedTD = TD;\n }\n }\n\n return TD;\n };\n },\n /**\n * Create a fresh class to be used as an editor, based on the editor component provided.\n *\n * @param {Object} vNode VNode for the editor child component.\n * @param {Boolean} containerComponent Instance of the component, which will be treated as a parent for the newly created editor component.\n * @returns {Class} The class used as an editor in Handsontable.\n */\n getEditorClass: function (vNode: VNode, containerComponent: Vue): typeof Handsontable.editors.BaseEditor {\n const componentKey: string = vNode.key ? vNode.key.toString() : null;\n const componentName: string = (vNode.componentOptions.Ctor as any).options.name;\n const componentCacheKey = componentKey ? `${componentName}:${componentKey}` : componentName;\n\n const editorCache = this.editorCache;\n let mountedComponent: EditorComponent = null;\n\n if (!editorCache.has(componentCacheKey)) {\n mountedComponent = createVueComponent(vNode, containerComponent, vNode.componentOptions.propsData, {isEditor: true});\n\n editorCache.set(componentCacheKey, mountedComponent);\n\n } else {\n mountedComponent = editorCache.get(componentCacheKey);\n }\n\n return mountedComponent.$data.hotCustomEditorClass;\n }\n },\n mounted: function () {\n this.columnSettings = this.getColumnSettings();\n\n return this.hotInit();\n },\n beforeDestroy: function () {\n if (this.hotInstance) {\n this.hotInstance.destroy();\n }\n },\n version: (packageJson as any).version\n };\n\n export default HotTable;\n export { HotTable };\n</script>\n","/**\n * vue-class-component v7.2.6\n * (c) 2015-present Evan You\n * @license MIT\n */\nimport Vue from 'vue';\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\n// The rational behind the verbose Reflect-feature check below is the fact that there are polyfills\n// which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys.\n// Without this check consumers will encounter hard to track down runtime errors.\nfunction reflectionIsSupported() {\n return typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;\n}\nfunction copyReflectionMetadata(to, from) {\n forwardMetadata(to, from);\n Object.getOwnPropertyNames(from.prototype).forEach(function (key) {\n forwardMetadata(to.prototype, from.prototype, key);\n });\n Object.getOwnPropertyNames(from).forEach(function (key) {\n forwardMetadata(to, from, key);\n });\n}\n\nfunction forwardMetadata(to, from, propertyKey) {\n var metaKeys = propertyKey ? Reflect.getOwnMetadataKeys(from, propertyKey) : Reflect.getOwnMetadataKeys(from);\n metaKeys.forEach(function (metaKey) {\n var metadata = propertyKey ? Reflect.getOwnMetadata(metaKey, from, propertyKey) : Reflect.getOwnMetadata(metaKey, from);\n\n if (propertyKey) {\n Reflect.defineMetadata(metaKey, metadata, to, propertyKey);\n } else {\n Reflect.defineMetadata(metaKey, metadata, to);\n }\n });\n}\n\nvar fakeArray = {\n __proto__: []\n};\nvar hasProto = fakeArray instanceof Array;\nfunction createDecorator(factory) {\n return function (target, key, index) {\n var Ctor = typeof target === 'function' ? target : target.constructor;\n\n if (!Ctor.__decorators__) {\n Ctor.__decorators__ = [];\n }\n\n if (typeof index !== 'number') {\n index = undefined;\n }\n\n Ctor.__decorators__.push(function (options) {\n return factory(options, key, index);\n });\n };\n}\nfunction mixins() {\n for (var _len = arguments.length, Ctors = new Array(_len), _key = 0; _key < _len; _key++) {\n Ctors[_key] = arguments[_key];\n }\n\n return Vue.extend({\n mixins: Ctors\n });\n}\nfunction isPrimitive(value) {\n var type = _typeof(value);\n\n return value == null || type !== 'object' && type !== 'function';\n}\nfunction warn(message) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-class-component] ' + message);\n }\n}\n\nfunction collectDataFromConstructor(vm, Component) {\n // override _init to prevent to init as Vue instance\n var originalInit = Component.prototype._init;\n\n Component.prototype._init = function () {\n var _this = this;\n\n // proxy to actual vm\n var keys = Object.getOwnPropertyNames(vm); // 2.2.0 compat (props are no longer exposed as self properties)\n\n if (vm.$options.props) {\n for (var key in vm.$options.props) {\n if (!vm.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n }\n\n keys.forEach(function (key) {\n Object.defineProperty(_this, key, {\n get: function get() {\n return vm[key];\n },\n set: function set(value) {\n vm[key] = value;\n },\n configurable: true\n });\n });\n }; // should be acquired class property values\n\n\n var data = new Component(); // restore original _init to avoid memory leak (#209)\n\n Component.prototype._init = originalInit; // create plain data object\n\n var plainData = {};\n Object.keys(data).forEach(function (key) {\n if (data[key] !== undefined) {\n plainData[key] = data[key];\n }\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(Component.prototype instanceof Vue) && Object.keys(plainData).length > 0) {\n warn('Component class must inherit Vue or its descendant class ' + 'when class property is used.');\n }\n }\n\n return plainData;\n}\n\nvar $internalHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeDestroy', 'destroyed', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch' // 2.6\n];\nfunction componentFactory(Component) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n options.name = options.name || Component._componentTag || Component.name; // prototype props.\n\n var proto = Component.prototype;\n Object.getOwnPropertyNames(proto).forEach(function (key) {\n if (key === 'constructor') {\n return;\n } // hooks\n\n\n if ($internalHooks.indexOf(key) > -1) {\n options[key] = proto[key];\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(proto, key);\n\n if (descriptor.value !== void 0) {\n // methods\n if (typeof descriptor.value === 'function') {\n (options.methods || (options.methods = {}))[key] = descriptor.value;\n } else {\n // typescript decorated data\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return _defineProperty({}, key, descriptor.value);\n }\n });\n }\n } else if (descriptor.get || descriptor.set) {\n // computed properties\n (options.computed || (options.computed = {}))[key] = {\n get: descriptor.get,\n set: descriptor.set\n };\n }\n });\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return collectDataFromConstructor(this, Component);\n }\n }); // decorate options\n\n var decorators = Component.__decorators__;\n\n if (decorators) {\n decorators.forEach(function (fn) {\n return fn(options);\n });\n delete Component.__decorators__;\n } // find super\n\n\n var superProto = Object.getPrototypeOf(Component.prototype);\n var Super = superProto instanceof Vue ? superProto.constructor : Vue;\n var Extended = Super.extend(options);\n forwardStaticMembers(Extended, Component, Super);\n\n if (reflectionIsSupported()) {\n copyReflectionMetadata(Extended, Component);\n }\n\n return Extended;\n}\nvar reservedPropertyNames = [// Unique id\n'cid', // Super Vue constructor\n'super', // Component options that will be used by the component\n'options', 'superOptions', 'extendOptions', 'sealedOptions', // Private assets\n'component', 'directive', 'filter'];\nvar shouldIgnore = {\n prototype: true,\n arguments: true,\n callee: true,\n caller: true\n};\n\nfunction forwardStaticMembers(Extended, Original, Super) {\n // We have to use getOwnPropertyNames since Babel registers methods as non-enumerable\n Object.getOwnPropertyNames(Original).forEach(function (key) {\n // Skip the properties that should not be overwritten\n if (shouldIgnore[key]) {\n return;\n } // Some browsers does not allow reconfigure built-in properties\n\n\n var extendedDescriptor = Object.getOwnPropertyDescriptor(Extended, key);\n\n if (extendedDescriptor && !extendedDescriptor.configurable) {\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(Original, key); // If the user agent does not support `__proto__` or its family (IE <= 10),\n // the sub class properties may be inherited properties from the super class in TypeScript.\n // We need to exclude such properties to prevent to overwrite\n // the component options object which stored on the extended constructor (See #192).\n // If the value is a referenced value (object or function),\n // we can check equality of them and exclude it if they have the same reference.\n // If it is a primitive value, it will be forwarded for safety.\n\n if (!hasProto) {\n // Only `cid` is explicitly exluded from property forwarding\n // because we cannot detect whether it is a inherited property or not\n // on the no `__proto__` environment even though the property is reserved.\n if (key === 'cid') {\n return;\n }\n\n var superDescriptor = Object.getOwnPropertyDescriptor(Super, key);\n\n if (!isPrimitive(descriptor.value) && superDescriptor && superDescriptor.value === descriptor.value) {\n return;\n }\n } // Warn if the users manually declare reserved properties\n\n\n if (process.env.NODE_ENV !== 'production' && reservedPropertyNames.indexOf(key) >= 0) {\n warn(\"Static property name '\".concat(key, \"' declared on class '\").concat(Original.name, \"' \") + 'conflicts with reserved property name of Vue internal. ' + 'It may cause unexpected behavior of the component. Consider renaming the property.');\n }\n\n Object.defineProperty(Extended, key, descriptor);\n });\n}\n\nfunction Component(options) {\n if (typeof options === 'function') {\n return componentFactory(options);\n }\n\n return function (Component) {\n return componentFactory(Component, options);\n };\n}\n\nComponent.registerHooks = function registerHooks(keys) {\n $internalHooks.push.apply($internalHooks, _toConsumableArray(keys));\n};\n\nexport default Component;\nexport { createDecorator, mixins };\n","<script lang=\"ts\">\n import Vue from 'vue';\n import Handsontable from 'handsontable/base';\n import Component from 'vue-class-component';\n\n @Component({})\n class BaseEditorComponent extends Vue implements Handsontable.editors.BaseEditor {\n name = 'BaseEditorComponent';\n instance = null;\n row = null;\n col = null;\n prop = null;\n TD = null;\n originalValue = null;\n cellProperties = null;\n state = null;\n hot = null;\n\n mounted() {\n const _this = this;\n\n this.$data.hotCustomEditorClass = function () {\n const customEditorClass = class CustomEditor extends Handsontable.editors.BaseEditor implements Handsontable.editors.BaseEditor {\n constructor(hotInstance) {\n super(hotInstance);\n\n _this.$data.hotCustomEditorInstance = this;\n }\n\n focus() {\n }\n\n getValue() {\n }\n\n setValue() {\n }\n\n open() {\n }\n\n close() {\n }\n } as any;\n\n // Fill with the rest of the BaseEditorComponent methods\n Object.getOwnPropertyNames(Handsontable.editors.BaseEditor.prototype).forEach(propName => {\n if (propName === 'constructor') {\n return;\n }\n\n customEditorClass.prototype[propName] = function (...args) {\n return _this[propName].call(this, ...args);\n }\n });\n\n return customEditorClass;\n }();\n }\n\n // BaseEditorComponent methods:\n private _fireCallbacks(...args) {\n (Handsontable.editors.BaseEditor.prototype as any)._fireCallbacks.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n beginEditing(...args) {\n return Handsontable.editors.BaseEditor.prototype.beginEditing.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n cancelChanges(...args) {\n return Handsontable.editors.BaseEditor.prototype.cancelChanges.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n checkEditorSection(...args) {\n return Handsontable.editors.BaseEditor.prototype.checkEditorSection.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n close(...args) {\n return Handsontable.editors.BaseEditor.prototype.close.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n discardEditor(...args) {\n return Handsontable.editors.BaseEditor.prototype.discardEditor.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n enableFullEditMode(...args) {\n return Handsontable.editors.BaseEditor.prototype.enableFullEditMode.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n extend(...args) {\n return Handsontable.editors.BaseEditor.prototype.extend.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n finishEditing(...args) {\n return Handsontable.editors.BaseEditor.prototype.finishEditing.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n focus(...args) {\n return Handsontable.editors.BaseEditor.prototype.focus.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n getValue(...args) {\n return Handsontable.editors.BaseEditor.prototype.getValue.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n init(...args) {\n return Handsontable.editors.BaseEditor.prototype.init.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n isInFullEditMode(...args) {\n return Handsontable.editors.BaseEditor.prototype.isInFullEditMode.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n isOpened(...args) {\n return Handsontable.editors.BaseEditor.prototype.isOpened.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n isWaiting(...args) {\n return Handsontable.editors.BaseEditor.prototype.isWaiting.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n open(...args) {\n return Handsontable.editors.BaseEditor.prototype.open.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n prepare(row, col, prop, TD, originalValue, cellProperties) {\n this.$data.hotInstance = cellProperties.instance;\n this.$data.row = row;\n this.$data.col = col;\n this.$data.prop = prop;\n this.$data.TD = TD;\n this.$data.originalValue = originalValue;\n this.$data.cellProperties = cellProperties;\n\n return Handsontable.editors.BaseEditor.prototype.prepare.call(this.$data.hotCustomEditorInstance, row, col, prop, TD, originalValue, cellProperties);\n }\n\n saveValue(...args) {\n return Handsontable.editors.BaseEditor.prototype.saveValue.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n setValue(...args) {\n return Handsontable.editors.BaseEditor.prototype.setValue.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n addHook(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).addHook.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n removeHooksByKey(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).removeHooksByKey.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n clearHooks(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).clearHooks.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n getEditedCell(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).getEditedCell.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n getEditedCellsZIndex(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).getEditedCellsZIndex.call(this.$data.hotCustomEditorInstance, ...args);\n }\n\n getEditedCellsLayerClass(...args) {\n return (Handsontable.editors.BaseEditor.prototype as any).getEditedCellsLayerClass.call(this.$data.hotCustomEditorInstance, ...args);\n }\n }\n\n export default BaseEditorComponent;\n export { BaseEditorComponent };\n</script>\n"],"names":["unassignedPropSymbol","Symbol","bulkComponentContainer","propFactory","source","registeredHooks","Handsontable","hooks","getRegistered","propSchema","prop","Object","assign","DefaultSettings","i","length","settings","id","type","String","Math","random","toString","substring","wrapperRendererCacheSize","Number","filterPassedProps","props","filteredProps","columnSettingsProp","propName","hasOwnProperty","prepareSettings","currentSettings","assignedProps","hotSettingsInProps","additionalHotSettingsInProps","newSettings","key","simpleEqual","findVNodeByType","componentSlots","componentVNode","every","slot","index","data","attrs","createVueComponent","vNode","parent","ownerDocument","$el","document","propsData","createElement","body","appendChild","componentContainer","componentOptions","Ctor","$mount","objectA","objectB","JSON","stringify","exports","NEWER","OLDER","LRUMap","limit","entries","size","oldest","this","newest","undefined","_keymap","Map","Entry","value","prototype","_markEntryAsUsed","entry","MAX_VALUE","clear","it","iterator","itv","next","done","e","set","Error","get","shift","has","f","normalizeComponent","template","style","script","scopeId","isFunctionalTemplate","moduleIdentifier","shadowMode","createInjector","createInjectorSSR","createInjectorShadow","options","hook","render","staticRenderFns","_compiled","functional","_scopeId","context","$vnode","ssrContext","__VUE_SSR_CONTEXT__","call","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","originalRender","h","existing","beforeCreate","concat","component","hotInstance","addHook","__internalEdit","filter","child","name","_typeof","obj","_typeof2","constructor","_defineProperty","defineProperty","enumerable","configurable","writable","_toConsumableArray","arr","Array","isArray","arr2","_arrayWithoutHoles","iter","from","_iterableToArray","TypeError","_nonIterableSpread","reflectionIsSupported","Reflect","defineMetadata","getOwnMetadataKeys","copyReflectionMetadata","to","forwardMetadata","getOwnPropertyNames","forEach","propertyKey","metaKey","metadata","getOwnMetadata","hasProto","__proto__","collectDataFromConstructor","vm","Component","originalInit","_init","_this","keys","push","plainData","$internalHooks","componentFactory","arguments","_componentTag","proto","indexOf","descriptor","getOwnPropertyDescriptor","methods","mixins","computed","decorators","__decorators__","fn","superProto","getPrototypeOf","Super","Vue","Extended","extend","forwardStaticMembers","shouldIgnore","callee","caller","Original","extendedDescriptor","superDescriptor","registerHooks","apply"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;w0FAIA,IA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EACXwG,WAAW,EACXoB,QAAQ,EACRC,QAAQ,GAGV,SAASH,EAAqBF,EAAUM,EAAUR,GAEhD5L,OAAO2J,oBAAoByC,GAAUxC,SAAQ,SAAUjI,OAEjDsK,EAAatK,QAKb0K,EAAqBrM,OAAOmL,yBAAyBW,EAAUnK,OAE/D0K,GAAuBA,EAAmB9D,kBAzJ7BlE,EACf9D,EA4JE2K,EAAalL,OAAOmL,yBAAyBiB,EAAUzK,OAQtDsI,EAAU,IAID,QAARtI,aAIA2K,EAAkBtM,OAAOmL,yBAAyBS,EAAOjK,MA5K7DpB,EAAOyH,EADQ3D,EA+KE6G,EAAW7G,OA5KhB,MAATA,IAA0B,WAAT9D,GAA8B,aAATA,IA4KH+L,GAAmBA,EAAgBjI,QAAU6G,EAAW7G,aAUhGrE,OAAOqI,eAAeyD,EAAUnK,EAAKuJ,QAIzC,SAASb,EAAUnE,SACM,mBAAZA,EACF2E,EAAiB3E,GAGnB,SAAUmE,UACRQ,EAAiBR,EAAWnE,IAIvCmE,EAAUkC,cAAgB,SAAuB9B,GAC/CG,EAAeF,KAAK8B,MAAM5B,EAAgBnC,EAAmBgC,KCrT/D;;;;;;;;;;;;;;;"}
|
package/es/vue-handsontable.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Handsontable from 'handsontable';
|
|
1
|
+
import Handsontable from 'handsontable/base';
|
|
2
2
|
import Vue from 'vue';
|
|
3
3
|
|
|
4
4
|
function ownKeys(object, enumerableOnly) {
|
|
@@ -147,6 +147,8 @@ function _assertThisInitialized(self) {
|
|
|
147
147
|
function _possibleConstructorReturn(self, call) {
|
|
148
148
|
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
149
149
|
return call;
|
|
150
|
+
} else if (call !== void 0) {
|
|
151
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
150
152
|
}
|
|
151
153
|
|
|
152
154
|
return _assertThisInitialized(self);
|
|
@@ -173,27 +175,34 @@ function _createSuper(Derived) {
|
|
|
173
175
|
|
|
174
176
|
var unassignedPropSymbol = Symbol('unassigned');
|
|
175
177
|
var bulkComponentContainer = null;
|
|
178
|
+
/**
|
|
179
|
+
* Message for the warning thrown if the Handsontable instance has been destroyed.
|
|
180
|
+
*/
|
|
181
|
+
|
|
182
|
+
var HOT_DESTROYED_WARNING = 'The Handsontable instance bound to this component was destroyed and cannot be' + ' used properly.';
|
|
176
183
|
/**
|
|
177
184
|
* Private method to ensure the table is not calling `updateSettings` after editing cells.
|
|
178
185
|
* @private
|
|
179
186
|
*/
|
|
180
187
|
|
|
181
188
|
function preventInternalEditWatch(component) {
|
|
182
|
-
component.hotInstance
|
|
183
|
-
component.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
component.
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
component.
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
component.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
component.
|
|
196
|
-
|
|
189
|
+
if (component.hotInstance) {
|
|
190
|
+
component.hotInstance.addHook('beforeChange', function () {
|
|
191
|
+
component.__internalEdit = true;
|
|
192
|
+
});
|
|
193
|
+
component.hotInstance.addHook('beforeCreateRow', function () {
|
|
194
|
+
component.__internalEdit = true;
|
|
195
|
+
});
|
|
196
|
+
component.hotInstance.addHook('beforeCreateCol', function () {
|
|
197
|
+
component.__internalEdit = true;
|
|
198
|
+
});
|
|
199
|
+
component.hotInstance.addHook('beforeRemoveRow', function () {
|
|
200
|
+
component.__internalEdit = true;
|
|
201
|
+
});
|
|
202
|
+
component.hotInstance.addHook('beforeRemoveCol', function () {
|
|
203
|
+
component.__internalEdit = true;
|
|
204
|
+
});
|
|
205
|
+
}
|
|
197
206
|
}
|
|
198
207
|
/**
|
|
199
208
|
* Generate an object containing all the available Handsontable properties and plugin hooks.
|
|
@@ -364,7 +373,7 @@ function simpleEqual(objectA, objectB) {
|
|
|
364
373
|
return JSON.stringify(objectA) === JSON.stringify(objectB);
|
|
365
374
|
}
|
|
366
375
|
|
|
367
|
-
var version="
|
|
376
|
+
var version="11.0.0";
|
|
368
377
|
|
|
369
378
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
370
379
|
|
|
@@ -581,10 +590,14 @@ var HotTable = {
|
|
|
581
590
|
props: propFactory('HotTable'),
|
|
582
591
|
watch: {
|
|
583
592
|
mergedHotSettings: function mergedHotSettings(value) {
|
|
593
|
+
if (!this.hotInstance || value === void 0) {
|
|
594
|
+
return;
|
|
595
|
+
}
|
|
596
|
+
|
|
584
597
|
if (value.data) {
|
|
585
598
|
if (this.hotInstance.isColumnModificationAllowed() || !this.hotInstance.isColumnModificationAllowed() && this.hotInstance.countSourceCols() === this.miscCache.currentSourceColumns) {
|
|
586
599
|
// If the dataset dimensions change, update the index mappers.
|
|
587
|
-
this.matchHotMappersSize(
|
|
600
|
+
this.matchHotMappersSize(); // Data is automatically synchronized by reference.
|
|
588
601
|
|
|
589
602
|
delete value.data;
|
|
590
603
|
}
|
|
@@ -601,6 +614,7 @@ var HotTable = {
|
|
|
601
614
|
}
|
|
602
615
|
},
|
|
603
616
|
data: function data() {
|
|
617
|
+
var thisComponent = this;
|
|
604
618
|
var rendererCache = new lru_1(this.wrapperRendererCacheSize); // Make the LRU cache destroy each removed component
|
|
605
619
|
|
|
606
620
|
rendererCache.shift = function () {
|
|
@@ -612,14 +626,27 @@ var HotTable = {
|
|
|
612
626
|
return {
|
|
613
627
|
__internalEdit: false,
|
|
614
628
|
miscCache: {
|
|
615
|
-
// TODO: A workaround for #7548; data.length !== rowIndexMapper.getNumberOfIndexes() for NestedRows plugin.
|
|
616
|
-
dataLength: 0,
|
|
617
629
|
currentSourceColumns: null
|
|
618
630
|
},
|
|
619
|
-
|
|
631
|
+
__hotInstance: null,
|
|
620
632
|
columnSettings: null,
|
|
621
633
|
rendererCache: rendererCache,
|
|
622
|
-
editorCache: new Map()
|
|
634
|
+
editorCache: new Map(),
|
|
635
|
+
|
|
636
|
+
get hotInstance() {
|
|
637
|
+
if (!thisComponent.__hotInstance || thisComponent.__hotInstance && !thisComponent.__hotInstance.isDestroyed) {
|
|
638
|
+
// Will return the Handsontable instance or `null` if it's not yet been created.
|
|
639
|
+
return thisComponent.__hotInstance;
|
|
640
|
+
} else {
|
|
641
|
+
console.warn(HOT_DESTROYED_WARNING);
|
|
642
|
+
return null;
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
|
|
646
|
+
set hotInstance(hotInstance) {
|
|
647
|
+
thisComponent.__hotInstance = hotInstance;
|
|
648
|
+
}
|
|
649
|
+
|
|
623
650
|
};
|
|
624
651
|
},
|
|
625
652
|
computed: {
|
|
@@ -632,8 +659,6 @@ var HotTable = {
|
|
|
632
659
|
* Initialize Handsontable.
|
|
633
660
|
*/
|
|
634
661
|
hotInit: function hotInit() {
|
|
635
|
-
var _newSettings$data$len, _newSettings$data;
|
|
636
|
-
|
|
637
662
|
var globalRendererVNode = this.getGlobalRendererVNode();
|
|
638
663
|
var globalEditorVNode = this.getGlobalEditorVNode();
|
|
639
664
|
var newSettings = prepareSettings(this.$props);
|
|
@@ -652,21 +677,25 @@ var HotTable = {
|
|
|
652
677
|
this.hotInstance = new Handsontable.Core(this.$el, newSettings);
|
|
653
678
|
this.hotInstance.init();
|
|
654
679
|
preventInternalEditWatch(this);
|
|
655
|
-
this.miscCache.dataLength = (_newSettings$data$len = newSettings === null || newSettings === void 0 ? void 0 : (_newSettings$data = newSettings.data) === null || _newSettings$data === void 0 ? void 0 : _newSettings$data.length) !== null && _newSettings$data$len !== void 0 ? _newSettings$data$len : 0;
|
|
656
680
|
this.miscCache.currentSourceColumns = this.hotInstance.countSourceCols();
|
|
657
681
|
},
|
|
658
|
-
matchHotMappersSize: function matchHotMappersSize(
|
|
682
|
+
matchHotMappersSize: function matchHotMappersSize() {
|
|
659
683
|
var _this = this;
|
|
660
684
|
|
|
685
|
+
if (!this.hotInstance) {
|
|
686
|
+
return;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
var data = this.hotInstance.getSourceData();
|
|
661
690
|
var rowsToRemove = [];
|
|
662
691
|
var columnsToRemove = [];
|
|
663
|
-
var
|
|
692
|
+
var indexMapperRowCount = this.hotInstance.rowIndexMapper.getNumberOfIndexes();
|
|
664
693
|
var isColumnModificationAllowed = this.hotInstance.isColumnModificationAllowed();
|
|
665
694
|
var indexMapperColumnCount = 0;
|
|
666
695
|
|
|
667
|
-
if (data && data.length !==
|
|
668
|
-
if (data.length <
|
|
669
|
-
for (var r = data.length; r <
|
|
696
|
+
if (data && data.length !== indexMapperRowCount) {
|
|
697
|
+
if (data.length < indexMapperRowCount) {
|
|
698
|
+
for (var r = data.length; r < indexMapperRowCount; r++) {
|
|
670
699
|
rowsToRemove.push(r);
|
|
671
700
|
}
|
|
672
701
|
}
|
|
@@ -688,13 +717,9 @@ var HotTable = {
|
|
|
688
717
|
|
|
689
718
|
this.hotInstance.batch(function () {
|
|
690
719
|
if (rowsToRemove.length > 0) {
|
|
691
|
-
_this.miscCache.dataLength -= rowsToRemove.length;
|
|
692
|
-
|
|
693
720
|
_this.hotInstance.rowIndexMapper.removeIndexes(rowsToRemove);
|
|
694
721
|
} else {
|
|
695
|
-
_this.
|
|
696
|
-
|
|
697
|
-
_this.hotInstance.rowIndexMapper.insertIndexes(oldDataLength - 1, data.length - oldDataLength);
|
|
722
|
+
_this.hotInstance.rowIndexMapper.insertIndexes(indexMapperRowCount - 1, data.length - indexMapperRowCount);
|
|
698
723
|
}
|
|
699
724
|
|
|
700
725
|
if (isColumnModificationAllowed && data.length !== 0) {
|
|
@@ -819,7 +844,9 @@ var HotTable = {
|
|
|
819
844
|
return this.hotInit();
|
|
820
845
|
},
|
|
821
846
|
beforeDestroy: function beforeDestroy() {
|
|
822
|
-
this.hotInstance
|
|
847
|
+
if (this.hotInstance) {
|
|
848
|
+
this.hotInstance.destroy();
|
|
849
|
+
}
|
|
823
850
|
},
|
|
824
851
|
version: version
|
|
825
852
|
};
|
|
@@ -1331,12 +1358,12 @@ var BaseEditorComponent = /*#__PURE__*/function (_Vue) {
|
|
|
1331
1358
|
|
|
1332
1359
|
var _super2 = _createSuper(CustomEditor);
|
|
1333
1360
|
|
|
1334
|
-
function CustomEditor(hotInstance
|
|
1361
|
+
function CustomEditor(hotInstance) {
|
|
1335
1362
|
var _this3;
|
|
1336
1363
|
|
|
1337
1364
|
_classCallCheck(this, CustomEditor);
|
|
1338
1365
|
|
|
1339
|
-
_this3 = _super2.call(this, hotInstance
|
|
1366
|
+
_this3 = _super2.call(this, hotInstance);
|
|
1340
1367
|
_this.$data.hotCustomEditorInstance = _assertThisInitialized(_this3);
|
|
1341
1368
|
return _this3;
|
|
1342
1369
|
}
|
|
@@ -1689,5 +1716,4 @@ var __vue_is_functional_template__ = undefined;
|
|
|
1689
1716
|
|
|
1690
1717
|
var __vue_component__ = /*#__PURE__*/normalizeComponent({}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
1691
1718
|
|
|
1692
|
-
export
|
|
1693
|
-
export { __vue_component__ as BaseEditorComponent, __vue_component__$1 as HotColumn, __vue_component__$2 as HotTable };
|
|
1719
|
+
export { __vue_component__ as BaseEditorComponent, __vue_component__$1 as HotColumn, __vue_component__$2 as HotTable, __vue_component__$2 as default };
|
|
Binary file
|
package/helpers.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import Vue, { VNode } from 'vue';
|
|
2
|
-
import Handsontable from 'handsontable';
|
|
2
|
+
import Handsontable from 'handsontable/base';
|
|
3
3
|
import { HotTableProps, VueProps, EditorComponent } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Message for the warning thrown if the Handsontable instance has been destroyed.
|
|
6
|
+
*/
|
|
7
|
+
export declare const HOT_DESTROYED_WARNING: string;
|
|
4
8
|
/**
|
|
5
9
|
* Rewrite the settings object passed to the watchers to be a clean array/object prepared to use within Handsontable config.
|
|
6
10
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@handsontable/vue",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "Best Data Grid for Vue with Spreadsheet Look and Feel.",
|
|
5
5
|
"author": "Handsoncode <hello@handsoncode.net> (https://handsoncode.net)",
|
|
6
6
|
"homepage": "https://handsontable.com",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"url": "https://github.com/handsontable/handsontable/issues"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"handsontable": ">=
|
|
47
|
+
"handsontable": ">=11.0.0",
|
|
48
48
|
"vue": "^2.5.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"cross-env": "^5.2.0",
|
|
62
62
|
"css-loader": "^3.0.0",
|
|
63
63
|
"del-cli": "^3.0.1",
|
|
64
|
-
"handsontable": "^
|
|
64
|
+
"handsontable": "^11.0.0",
|
|
65
65
|
"jest": "^26.6.3",
|
|
66
66
|
"rollup": "^2.0.0",
|
|
67
67
|
"rollup-plugin-babel": "^4.3.2",
|
package/types.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import Handsontable from 'handsontable';
|
|
1
|
+
import Handsontable from 'handsontable/base';
|
|
2
2
|
import Vue, { VNode } from 'vue';
|
|
3
3
|
import { ThisTypedComponentOptionsWithRecordProps } from 'vue/types/options';
|
|
4
4
|
export interface HotTableData {
|
|
5
5
|
__internalEdit: boolean;
|
|
6
|
+
__hotInstance: Handsontable | null;
|
|
6
7
|
miscCache?: {
|
|
7
8
|
currentSourceColumns?: number;
|
|
8
9
|
};
|
|
9
|
-
hotInstance?: Handsontable;
|
|
10
|
+
hotInstance?: Handsontable | null;
|
|
10
11
|
columnSettings: HotTableProps[];
|
|
11
12
|
rendererCache: any;
|
|
12
13
|
editorCache: Map<string, EditorComponent>;
|
|
@@ -18,7 +19,7 @@ export interface HotTableMethods {
|
|
|
18
19
|
getGlobalEditorVNode: () => VNode | void;
|
|
19
20
|
getRendererWrapper: (vNode: VNode, containerComponent: Vue) => (...args: any[]) => HTMLElement;
|
|
20
21
|
getEditorClass: (vNode: VNode, containerComponent: Vue) => typeof Handsontable.editors.BaseEditor;
|
|
21
|
-
matchHotMappersSize: (
|
|
22
|
+
matchHotMappersSize: () => void;
|
|
22
23
|
}
|
|
23
24
|
export interface HotTableProps extends Handsontable.GridSettings {
|
|
24
25
|
id?: string;
|
|
Binary file
|